package csse3004.GD.PM;

import csse3004.GD.DA.PollMasterDA;
import csse3004.GD.DA.SysAdminDA;
import csse3004.GD.ParticipantListTemplate;
import csse3004.GD.PollAdminAccount;
import csse3004.GD.SysAdmin.SysAdminService;
import java.util.ArrayList;
import java.util.logging.Logger;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author s4201567 Tony Yu
 */
public class ParticipantListController implements Controller {
    
    private static final Logger m_logger = Logger.getLogger(ParticipantListController.class.getName());

    private PollMasterService pms = new PollMasterDA();
    
    public ModelAndView handleRequest(HttpServletRequest hsr, HttpServletResponse hsr1) throws Exception {
        ArrayList<ParticipantListTemplate> temp = new ArrayList<ParticipantListTemplate>();
        
        temp = pms.getTemplates();

        ModelAndView mnv = new ModelAndView("partList", "temps", temp); 
        return mnv;
    }
}